//入口文件

//默认初始化样式文件
//import './assets/main.css'

//导入初始化样式文件
import '@/styles/common.scss'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

//图片懒加载
import { lazyPlugin } from './directives'
//全局组件
import { componentPlugin } from '@/components'

import piniaPluginPersistedState from 'pinia-plugin-persistedstate'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'




const app = createApp(App)
//pinia持久化插件
const pinia = createPinia()
pinia.use(piniaPluginPersistedState)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(pinia)
app.use(router)
app.use(lazyPlugin)
app.use(componentPlugin)

app.mount('#app')


